package com.opennetexam.manager.sqlprovider;

import org.apache.log4j.Logger;

import java.util.Map;

/**
 * @author naicha
 * Created on 2017/11/8.
 */
public class ExamAppProvider {

    private static Logger logger = Logger.getLogger(ExamAppProvider.class);

    public String getApp(Map<String,Object> parameter){
        String siteId = (String) parameter.get("siteId");
        StringBuilder stringBuffer = new StringBuilder("");
        stringBuffer.append("SELECT app.AppID,app.AppName,app.AppUrl,app.AppFTPUrl,app.LogoName FROM ExamApp as app JOIN ExamAppSiteRelation re ON app.AppID = re.AppID ");
        stringBuffer.append("WHERE re.ExamSiteID = \'").append(siteId).append("\'");
        logger.info(stringBuffer.toString());
        return stringBuffer.toString();
    }
}
